package org.idea.qiyu.common.dto;

import java.io.Serializable;
import java.util.*;

/**
 * @Author linhao
 * @Date created in 7:10 下午 2021/9/9
 */
public class AgentCollectorDataDTO implements Serializable {

    private static final long serialVersionUID = 7009212500487591052L;

    /**
     * 调用源头的traceId
     */
    private String headTraceId;

    /**
     * 请求的json
     */
    private String json;

    /**
     * 请求traceId Map
     */
    private List<Map<String, List<String>>> traceIdMap = new ArrayList<>(1);

    /**
     * 时间戳 调用请求的时间戳
     */
    private long timestamp;

    /**
     * 请求来源
     * 1 发起请求的源头是consumer
     * 2 请求的接收方是provider
     */
    private short requestSource;

    /**
     * 1 dubbo请求 2 web请求
     */
    private short reportType;

    public String getJson() {
        return json;
    }

    public void setJson(String json) {
        this.json = json;
    }

    public String getHeadTraceId() {
        return headTraceId;
    }

    public void setHeadTraceId(String headTraceId) {
        this.headTraceId = headTraceId;
    }

    public List<Map<String, List<String>>> getTraceIdMap() {
        return traceIdMap;
    }

    public void setTraceIdMap(List<Map<String, List<String>>> traceIdMap) {
        this.traceIdMap = traceIdMap;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public short getReportType() {
        return reportType;
    }

    public void setReportType(short reportType) {
        this.reportType = reportType;
    }

    @Override
    public String toString() {
        return "AgentCollectorDataDTO{" +
                "headTraceId='" + headTraceId + '\'' +
                ", traceIdMap='" + traceIdMap + '\'' +
                ", json='" + json + '\'' +
                ", timestamp=" + timestamp +
                ", reportType=" + reportType +
                '}';
    }
}
